#ifndef grocerylistviewlist_h
#define grocerylistviewlist_h

#include "juce_amalgamated.h"
#include "../../FoodObjects/Eatable.h"
#include <map>
#include <vector>

using std::map;
using std::vector;

class GroceryListView;

class GroceryListViewList: public Component {
private:
	GroceryListView* glView;
	map<String, vector<Eatable> >& groceryItems;
	int mouseY;
	int mouseX;
	int offset;
	//	friend class GroceryListView;
public:
	GroceryListViewList(GroceryListView* glView, map<String, vector<Eatable> >& items);
	void paint(Graphics& g);
	void mouseDown(const MouseEvent& e);
	void mouseMove(const MouseEvent& e);
	void addItem(Eatable& food);
	void setCurrentYOffset(int offset);
	int getTotalHeight();
};

#endif
